package com.niit.controller;


import com.niit.pojo.Place;
import com.niit.pojo.Supply;
import com.niit.service.SupplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class SupplyController {
    @Autowired
    private SupplyService supplyService;

    @RequestMapping("/toAddSupply")
    public String toAddSupply(){
        return "/addSupply";
    }

    @RequestMapping("addSupply")
    public String addSupply(Supply supply){
        supplyService.addSupply(supply);
        return "redirect:/toAddProduct";
    }
}
